<template>
	<div>
        <mu-card-media >
          <img id="index-img" style="width: 100%;" :src="indexBg" />
        </mu-card-media>
		
		
		<!--<mu-paper class="botNav_tea" v-show="true">
		  <mu-bottom-nav :value="bottomNav" @change="handleChange" > 
		    <mu-bottom-nav-item value="home" title="首页" href="#/index_teacher" icon="home" iconClass="bottom-icon"   />
		    <mu-bottom-nav-item value="question_answer" title="问答"  icon="question_answer" iconClass="bottom-icon" activeClass="router-link-active" />
		    <mu-bottom-nav-item value="comment" title="统计" icon="insert_chart" iconClass="bottom-icon" />
		    <mu-bottom-nav-item value="account_box" title="我的" href="#/teacher_info" icon="account_box" iconClass="bottom-icon" />
		  </mu-bottom-nav>
		</mu-paper>-->
		
		
        <section id="icon-container" >
        </section>
        	<div class="class-list" >
        		<section class="left-nav" @click="queryAddress('schedule_teacher',publicInfo)">
        			<span >
        				<a>{{publicInfo.academic.replace(/20/g,'')}}</a>
        				<a>第{{publicInfo.semester}}学期</a>
        			</span>
        			<span>
        				<a style="color: #2799f3;font-size: 1rem;">{{weekDay}}</a>
        				<!--<a style="color: #d7d7d7;font-size: 0.8rem"></a>-->
        				<!--<a>{{currentYear}}</a>-->
        				<a>{{month}}</a>
        			</span>
        			<span>
        				<a>教学周</a>
        				<a>第{{publicInfo.teachWeek}}周</a>
        			</span>
        		</section>
        		<section class="right-content" >
        			<swiper :options="swiperOption" class="swiper-box">
					 	<swiper-slide v-if="todayCourse.length==0" class="swiper-item add-style">
							<section class="slide-sec">
					    		<mu-icon class="new-icon"  value="description" color="blue" />
					    		<span>暂无课程</span>
					    	</section>
					    </swiper-slide>
					    <swiper-slide v-for="item in todayCourse" class="swiper-item add-style">
					    	<section class="slide-sec">
					    		<mu-icon class="new-icon"  value="description" color="blue" />
					    		<!--<span>{{item.DJJ+'-'+(parseInt(item.DJJ)+parseInt(item.SKCD)-1)}}节</span>-->
					    		<span>{{item.courseWhichIndex+'-'+(parseInt(item.courseWhichIndex)+1)}}节</span>
					    	</section>
					    	<section class="slide-sec">
					    		<mu-icon class="new-icon"  value="receipt" color="blueGrey500" />
					    		<span>
					    			{{fitWidth(item.courseName)}}
					    			<a @click="open(item.courseName,'课程详情')" class="click-ellipsis"  v-show="btnDetail(fitWidth(item.courseName))"></a>
				    				
					    		</span>
					    		
					    	</section>
					    	<section class="slide-sec">
					    		<mu-icon class="new-icon"  value="room" color="green500" />
					    		<!--<span>{{(item.course_classroom_position.length>7)?(item.course_classroom_position.slice(0,7)+'...'):item.course_classroom_position}}</span>-->
					    		<span>
					    			{{fitWidth(item.courseClassroomPosition.length==0?'上课地点另行通知':item.courseClassroomPosition)}}
					    			<a @click="open(item.courseClassroomPosition,'上课地点')" class="click-ellipsis"  v-show="btnDetail(fitWidth(item.courseClassroomPosition))"></a>
				    				<!--<mu-dialog :open="dialog2" title="上课地点">
				    					{{detailInfo}}
								    	<mu-flat-button label="确定" slot="actions" primary @click="close"/>
								    </mu-dialog>-->
					    		</span>
					    	</section>
					    	<section class="slide-sec">
					    		<mu-icon class="new-icon"  value="perm_identity" color="orange700" />
					    		<span>
					    			{{fitWidth(item.className)}}
					    			<a @click="open(item.className,'上课班级')" class="click-ellipsis"  v-show="btnDetail(fitWidth(item.className))"></a>
					    			<!--<mu-dialog :open="dialog3" title="上课班级">
				    					{{detailInfo}}
								    	<mu-flat-button label="确定" slot="actions" primary @click="close"/>
								    </mu-dialog>-->
					    		</span>
					    	</section>
					    	
					    </swiper-slide>
					    <div class="swiper-pagination" slot="pagination"></div>
					  </swiper>
					  <mu-dialog :open="dialog" title="课程详情">
    					{{detailInfo}}
				    	<mu-flat-button label="确定" slot="actions" primary @click="close"/>
				      </mu-dialog>
        		</section>
        		
        	</div>
         <div class="module-container" style="margin-top: 0.5rem;">
        		
        	   <!--<section @click="gotoAddress({path:'rollCall'})" v-if="userIdentity=='Teacher'">
        	   		<mu-icon color="#de8c36" :size="32" value="snooze"/>
        	   		<span>班级点名</span>
        	   </section>-->
        	    <!--<mu-flat-button class="item-gird"  @click="gotoAddress({path:'rollCall'})" v-if="userIdentity=='Teacher'">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="#de8c36" :size="26" value="snooze"/>
        	   			<span>班级点名</span>
        	   		</section>
        	   </mu-flat-button>-->
        	   <!--<section @click="gotoAddress({path:'teacher'})" v-if="userIdentity=='Teacher'">
        	   		<mu-icon color="#47a9d6" :size="32" value="assignment_ind"/>
        	   		<span>教师评学</span>
        	   </section>-->
        	   
        	   <!--<mu-flat-button class="item-gird"  @click="gotoAddress({path:'teacher'})" v-if="userIdentity=='Teacher'">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="#47a9d6" :size="26" value="assignment_ind"/>
        	   			<span>教师评学</span>
        	   		</section>
        	   </mu-flat-button>

        	   <mu-flat-button class="item-gird"  href="/gleenSoft-base/web/cy.html#/list" v-if="false">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="green500" :size="26" value="class"/>
        	   			<span>课堂测验</span>
        	   		</section>
        	   </mu-flat-button>
        	   
        	    <mu-flat-button class="item-gird"  @click="gotoAddress({path:'commissary'})">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="#ee5e67" :size="26" value="today"/>
        	   			<span>课堂日志</span>
        	   		</section>
        	   </mu-flat-button>
        	    <mu-flat-button class="item-gird"  :to="'attendance/'">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="#95adff" :size="26" value="assignment_turned_in"/>
        	   			<span>课堂考勤</span>
        	   		</section>
        	   </mu-flat-button>
        	   <mu-flat-button class="item-gird"  @click="gotoAddress({path:'student'})">
        	   		<section class="btn-sec">
        	   			<mu-icon color="#95d55b" :size="26" value="loyalty"/>
        	   			<span>学生评教</span>
        	   		</section>
        	   </mu-flat-button>
        	   <mu-flat-button class="item-gird"  @click="gotoAddress({path:'courseFeedback'})">
        	   		<section class="btn-sec">
        	   			<mu-icon color="#3b95f2" :size="26" value="feedback"/>
        	   			<span>反馈</span>
        	   		</section>
        	   </mu-flat-button>-->
        	   
        	   <!--<mu-flat-button class="item-gird"  @click="queryAddress('teacherAttendance',publicInfo)" v-if="true">
        	   		<section class="btn-sec" >
        	   			<mu-icon color="#de8c36" :size="26" value="snooze"/>
        	   			<span>班级点名</span>
        	   		</section>
        	   </mu-flat-button><-->
        	   
        	   
        	   <mu-flat-button v-if="item.type=='3'" class="item-gird" @click="queryAddress(item.url,publicInfo)" v-for="item in btnJuri">
        	   		<section class="btn-sec">
        	   			<mu-icon :color="item.color" :size="26" :value="item.icon"/>
        	   			<span>{{item.name}}</span>
        	   			<!--<section class="IndexCorner" v-show="isShowCorner(item)" >{{unSubCount(item)}}</section>-->
        	   		</section>
        	   </mu-flat-button>
	            
		    </div>
        	
        
        <section style="width: 100%; display: flex; flex-direction: row;align-items: center; background-color: #fff; margin-top: 0.8rem;">
        	
       		<mu-flat-button style="width:100%; height: auto; " @click="gotoAddress({path:showNews.length==0?'index':'tzzx'})">
       			
       			<mu-icon  value="notifications_none" color="#2799f3" :size="50" style="width:25%; text-align: center;"/>
	        	<ul  class="mid-ul-content" >
	       			<li  class="line-message" v-for="(item,index) in showNews">
	       				<span >{{item.schoolAnnouncementTitle}}</span>
	       				<!--<aside class="when-prop" >23小时前</aside>-->
	       			</li>
	       			<li v-if="showNews.length==0" style="text-align: left;">
	       				暂无最新消息
	       			</li>
	       		</ul>
	       		<section style="width: 10%;"></section>
    	   		<section style="width: 10%;">
    	   			<!--<mu-icon color="green500" :size="26" value="class"/>-->
    	   			<mu-icon  value="keyboard_arrow_right"/>
    	   		</section>
    	   </mu-flat-button>
        </section>
	  	<mu-card-media id="card-img"  style=" opacity: 0.4;">
          <img style="width: 100%;"  :src="botBg"/>
        </mu-card-media> 
        
	    <div v-show="false" class="" style="width: 100%;height: 100%; position:fixed;left:0;top:0;background-color: rgba(0,0,0,0.1);display: flex;justify-content: center;align-items: center;z-index: 350;">
			<mu-circular-progress :size="24" color="green500"/>
		</div>
        
	</div>
		
</template>
<script>
import store from '../store/store'

export default {
	data(){
		return{
			swiperOption: {
	          pagination: '.swiper-pagination',
	          direction: 'horizontal',
	          slidesPerView: 1,
	          paginationClickable: true,
	          spaceBetween: 0,
	          mousewheelControl: true,
	          paginationType: 'custom',
	          slidesPerGroup: 1
	        },
			allParameters:{
			  XN: '',
			  XQ: '',
			  KXRQ: ''
			},
			ZC: '1',
			mainData:[],
			userIdentity:'',
		    isCommissary:false,
		    userInfo:{},
		    month:'',
		    weekDay:'',
		    currentYear:'',
		    studyYear:'',
		    Notice:[],
		    indexBg:'static/images/logo1.19.png',
		    botBg:'static/images/appbg2.0.png',
		    dialog: false,
		    dialog2:false,
		    dialog3:false,
		    detailInfo:'',
		    tzlb:[],
		    todayCourse:{},
		    publicInfo:{
		    	academic:'',
		    	semester:'',
		    	teachWeek:''
		    },
		    showNews:{},
		    firCourse:'',
		    btnJuri:{},
		    isToCourse:false,
		    isPublic:false,
		    isAnnounce:false,
		    diaryCount:0,
		    attCount:0,
		    bottomNav:''
		}
	},mounted(){
		this.btnJuri=JSON.parse(localStorage.userJurisdiction)
//		var noReapt=[]
//		var noReaptKey=[]
//		for(var i in this.btnJuri){
//			if(noReaptKey.indexOf(this.btnJuri[i].name)==-1){
//				noReaptKey.push(this.btnJuri[i].name)
//				noReapt.push(this.btnJuri[i])
////				console.info(noReapt)
//			}
//		}
//		this.btnJuri=noReapt
//		console.info(this.btnJuri)
        this.variousTime()
//		this.getPublicInfo()
		let that=this
        this.flexStyleDo()
		this.dealDate()

        this.loadMessage()
        
        
//      this.todayCourse=[{"courseClassroomPosition":"测试教学楼","courseName":"测试课程","courseAcademicYear":"2017-2018","courseAcademicTerm":"1","courseWhichWeek":"22","courseWhichDay":"4","courseWhichIndex":"1","courseTeacherId":"0141307018","courseClassName":"临床一班","currentDate":"2018-02-01","classCourseId":"bbb","isAttendance":0,"courseDiaryState":0},{"courseClassroomPosition":"测试教学楼","courseName":"测试课程","courseAcademicYear":"2017-2018","courseAcademicTerm":"1","courseWhichWeek":"22","courseWhichDay":"4","courseWhichIndex":"3","courseTeacherId":"0141307018","courseClassName":"护理一班和护理二班","currentDate":"2018-02-01","classCourseId":"bbb2","isAttendance":0,"courseDiaryState":0}]

	},computed:{
//		url: function() {   不同學生登錄得到不同url
//			
//			//
//         // return '/gleenSoft-base/jxkh/jxrl/dayClassBy'+this.userIdentity;
//      }
	},
  	methods: {
  		handleChange (val) {
      		this.bottomNav = val
   	    },
//		unSubCount(val){
//			if(val.name=='课堂日志'){
//				return this.diaryCount
//			}else if(val.name=='课堂考勤'){
//				return this.attCount
//			}
//		},
//		isShowCorner(val){
//			if(val.name=='课堂日志'){
//				if(this.diaryCount==0){
//					return false
//				}else{
//					return true
//				}
//			}else if(val.name=='课堂考勤'){
//				if(this.attCount==0){
//					return false
//				}else{
//					return true
//				}
//			}else if(val.name=='反馈'){
//					return false
//			}else if(val.name=='学生评教'){
//					return false
//			}
//			
//		},
  		//获取公共学年学期 和教学周
  		getPublicInfo(data){
  			let that=this
  			that.axios.get('/iyx/courseDate/getDayInfo/'+that.currentFullDate).then(function(response){
  				that.publicInfo.academic=response.data.courseAcademicYear
				that.publicInfo.semester=response.data.courseAcademicTerm
				that.publicInfo.teachWeek=response.data.courseWhichWeek
//				console.info(that.publicInfo)
				that.loadTeacherClassInfo()
				that.loadWeekClassInfo()
//				that.teacherClassAttdance()
//				that.isPublic=false
  			})
  		},
  		variousTime(){
	    	var thisDate=new Date()
			var currentYear=thisDate.getFullYear()
		  	var mon=this.correcTime(thisDate.getMonth()+1)       
		  	var toDate=this.correcTime(thisDate.getDate())
		  	var currentHour=this.correcTime(thisDate.getHours()) 
		  	var currentMinutes=this.correcTime(thisDate.getMinutes())
			this.currentmonth=mon+'-'+toDate
		  	this.currentTime=currentHour+':'+currentMinutes
		  	this.currentFullDate=currentYear+'-'+this.currentmonth
//		  	console.info(this.currentFullDate)
			this.getPublicInfo()
	    },
	   
	    correcTime(data){
	    	if(data<10){
	    		data='0'+data
	    	}
	    	return data
	    },
	    loadTeacherClassInfo(){
	    	let that=this
	    	var whichDay=''+new Date().getDay()
	    		whichDay= whichDay=='0'?'7':whichDay
	    	that.axios.post('/iyx/TeacherCourse/Day',{
    			"teacherId": localStorage.userNumber,
				"courseAcademicYear": that.publicInfo.academic,
				"courseAcademicTerm": that.publicInfo.semester,
				"courseWhichWeek": that.publicInfo.teachWeek,
				"courseWhichDay": whichDay
	    	}).then(function(response){
	    		console.info(response.data)
	    		that.todayCourse=response.data
	    	}).catch(function(error){
	    		console.info(error)
	    	})
	    },
	    loadWeekClassInfo(){
	    	let that=this
	    	that.axios.post('/iyx/TeacherCourse/Week',{
    			"teacherId": localStorage.userNumber,
				"courseAcademicYear": that.publicInfo.academic,
				"courseAcademicTerm": that.publicInfo.semester,
				"courseWhichWeek": that.publicInfo.teachWeek,
	    	}).then(function(response){
	    		console.info(response.data)
	    	}).catch(function(error){
	    		console.info(error)
	    	})
	    },
//	    teacherClassAttdance(){
//	    	let that=this
//	    	var whichDay=''+new Date().getDay()
//	    		whichDay= whichDay=='0'?'7':whichDay
//	    	that.axios.post('/iyx/TeacherClassAttendance/Details',{
//  			"teacherId": localStorage.userNumber,
//				"courseAcademicYear": that.publicInfo.academic,
//				"courseAcademicTerm": that.publicInfo.semester,
//				"courseWhichWeek": that.publicInfo.teachWeek,
//				"courseWhichDay": whichDay,
//				"courseWhichIndex": "5"
//	    	}).then(function(response){
//	    		console.info(response.data)
//	    	}).catch(function(error){
//	    		console.info(error)
//	    	})
//	    },
  		loadCoureInfo(){
  			let that = this
  			//为测试正确性使用日期死值
	      	that.axios.get('iyx/course/'+that.currentFullDate+'/'+localStorage.classId+'/ClassDayCourse?token='+localStorage.token).then(function (response) {
	      		that.todayCourse=response.data
//	      		console.info(that.todayCourse)
	      		var a=0
	      		var b=0
	      		for(var i in that.todayCourse){
	      			if(that.todayCourse[i].courseDiaryState==0){
	      				a++
	      			}
	      			if(that.todayCourse[i].isAttendance==0){
	      				b++
	      			}
	      		}
	      		that.diaryCount=a
	      		that.attCount=b
	      		that.isToCourse=false
//	        	that.getPublicInfo(that.todayCourse)
//	        	that.firCourse=that.todayCourse[0].classCourseId
	      	}).catch(function (error) {
	        	console.log(error);
	      	});
  		},
  		loadMessage(){
			let that = this
			
			//通知公告todo
			that.axios.get('iyx/announce/SelectFew?count=2').then(function (response) {
				that.showNews=response.data
//				that.isAnnounce=false
//				console.info(that.showNews[0].schoolAnnouncementTitle)
	      	}).catch(function (error) {
	        	console.log(error);
	      	});
		},
		
		
		refreshNoChange(){
      	var _url=window.location.href
    	var index=_url.lastIndexOf("#")
    	var lastPath=_url.substring(index+1)
    	if(lastPath=='/index_teacher'){
    		this.bottomNav='home'
    		this.isTopNav=false
    		this.isBotNav=true
    	}else if(lastPath=='/commissary'){
    		this.titleName='课堂日志'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath.indexOf('/attendance')!=-1){
    		this.titleName='课堂考勤'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/student'){
    		this.titleName='学生评教'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/login'){
    		this.isTopNav=false
    		this.isBotNav=false
    	}else if(lastPath=='/ChangePassword'){
    		this.titleName='修改密码'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/user-info'){
    		this.bottomNav='account_box'
    		this.isTopNav=false
    		this.isBotNav=true
    	}else if(lastPath=='/teacher'){
    		this.titleName='教师评学'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/rollCall'){
    		this.titleName='班级点名'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/tzzx'){
	        this.titleName='通知中心'
	        this.isTopNav=true
	        this.isBotNav=false
	      }else if(lastPath.indexOf('/tznr')!=-1){
	        this.titleName='通知内容'
	        this.isTopNav=true
	        this.isBotNav=false
	      }else if(lastPath.match('/ttk')=='/ttk'){
    		this.titleName='调课'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/personal-info'){
    		this.titleName='个人中心'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/bind-account'){
    		this.titleName='账号绑定'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/problem-feedback'){
    		this.titleName='问题反馈'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/feeling'){
    		this.titleName='感悟'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/clear-cache'){
    		this.titleName='清理缓存'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath.indexOf('/schedule')!=-1){
    		this.titleName=''
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath.indexOf('/zk')==0){
    		this.titleName='增课'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/improve_info'){
    		this.titleName='完善资料'
    		this.isTopNav=true
    		this.isBotNav=false
    	}else if(lastPath=='/setKey'){
    		this.titleName='设置秘钥'
    		this.isTopNav=true
    		this.isBotNav=false
    	}
    },
		
		
		attendState(data1,data2,state){
			var currentDate = new Date()
			var currentTime=parseInt(currentDate.getTime())
			var dataYear = this.mainData[0].SJ.replace(new RegExp("-","gm"),"/")
			
			if(data1==1&&data2==2){
				var dataStartTime = this.allParameters['1_class_start']
				var dataEndTime = this.allParameters['2_class_end']
			}else if(data1==3&&data2==4){
				var dataStartTime = this.allParameters['3_class_start']
				var dataEndTime = this.allParameters['4_class_end']
			}else if(data1==5&&data2==6){
				var dataStartTime = this.allParameters['5_class_start']
				var dataEndTime = this.allParameters['6_class_end']
			}else if(data1==7&&data2==8){
				var dataStartTime = this.allParameters['7_class_start']
				var dataEndTime = this.allParameters['8_class_end']
			}
			var dataSTime = dataYear+' '+dataStartTime
			var dataETime = dataYear+' '+dataEndTime
			var dataSTimeSec = parseInt((new Date(dataSTime)).getTime())
			var dataETimeSec = parseInt((new Date(dataETime)).getTime())
			var classState={
				isUnstart:false,
				isStart:false,
				isEnd:false
			}
			if(currentTime<dataSTimeSec){
				classState['isUnstart']=true
			}else if(currentTime>=dataSTimeSec&&currentTime<=dataETimeSec){
				classState['isStart']=true
			}else if(currentTime>dataETimeSec){
				classState['isEnd']=true
			}
			return classState[state]
			
		},
	  gotoAddress(path){
		var self=this
		setTimeout(function(){
			self.$router.push(path)
		},200)
      },
      queryAddress(path,queryData){
      	this.$router.push({
	        path:path,
			query:queryData
      	})
      },
      paramsAddress(path,paramData){
      	this.$router.push({
	        name:path,
			params:paramData
      	})
      },
      dealDate(){
      	var myDate=new Date()
      	var week=['日','一','二','三','四','五','六']
      	this.weekDay='周'+week[myDate.getDay()]
      	this.currentYear=myDate.getFullYear()
      	var mon=myDate.getMonth()+1
      	var toDate=myDate.getDate()
      	if(mon<10){
      		mon='0'+mon
      	}
      	if(toDate<10){
      		toDate='0'+toDate
      	}
      	this.month=mon+'-'+toDate
      },
      fitWidth(data){
      	 var scrWidth=document.body.offsetWidth
      	 if(scrWidth>310&&scrWidth<330){
      	 	var thisData=data.length>9?(data.slice(0,9)+'...'):data
      	 }else if(scrWidth>=330&&scrWidth<370){
      	 	var thisData=data.length>11?(data.slice(0,11)+'...'):data
      	 }else if(scrWidth>=370&&scrWidth<400){
      	 	var thisData=data.length>14?(data.slice(0,14)+'...'):data
      	 }else if(scrWidth<=310){
      	 	var thisData=data.length>7?(data.slice(0,7)+'...'):data
      	 }else if(scrWidth>=400&&scrWidth<430){
      	 	var thisData=data.length>17?(data.slice(0,17)+'...'):data
      	 }else if(scrWidth>=400&&scrWidth<470){
      	 	var thisData=data.length>20?(data.slice(0,20)+'...'):data
      	 }else if(scrWidth>=470&&scrWidth<500){
      	 	var thisData=data.length>22?(data.slice(0,22)+'...'):data
      	 }else if(scrWidth>=500){
      	 	var thisData=data
      	 }
      	 return thisData
      },
      fitProp(data){
      	var scrWidth=document.body.offsetWidth
  		if(scrWidth>310&&scrWidth<330){
  			var intercept=data.length>8?(data.slice(0,8)+'...'):data
  		}else if(scrWidth>=330&&scrWidth<370){
  			var intercept=data.length>10?(data.slice(0,10)+'...'):data
  		}else if(scrWidth>=370){
      	 	var intercept=data.length>12?(data.slice(0,12)+'...'):data
      	 }else if(scrWidth<=310){
      	 	var thisData=data.length>6?(data.slice(0,6)+'...'):data
      	 }
  		return intercept
      },
      flexStyleDo(){
        var Notice=document.getElementById('notice-show')
//    	var muIcontent=Notice.getElementsByClassName('mu-item-content')[0]
      },
      open (val,info) {
      	this.detailInfo=val
      	this.dialog = true
//    	if(info=='课程详情'){
//    		this.dialog = true
//    	}else if(info=='上课地点'){
//    		this.dialog2 = true
//    	}else if(info=='上课班级'){
//    		this.dialog3 = true
//    	}
	  },
	   close () {
	      this.dialog= false
	   },
	   btnDetail(data){
	   	  var points = data.substring(data.length-3,data.length)
	   	  if(points=='...'){
	   	  	return true
	   	  }else{
	   	  	return false
	   	  }
	   }
	}
}

</script>
<style scoped>
/*.botNav_tea{
	position: fixed !important;
    left: 0!important;
	bottom: 0!important; 
	z-index: 250;
	width: 100%;
 }*/
ul,li{
	list-style: none;
	margin: 0;
	padding: 0;
}
.mid-ul-content{
	margin-left: 0;
	display: block;
	padding: 0.7rem 0; 
	/*flex: 5;*/
	width: 55%;
	z-index: 160;
	position: relative;
}
.IndexCorner{
	position: absolute;
	right: 0.8rem;
	top:0.6rem;
	width: 16px;
	height: 16px;
	background: red;
	z-index: 180;
	border-radius: 50%;
	color: white;
	line-height: 16px;
}
.line-message{
	display: flex; 
	/*flex-direction: row;*/
	line-height: 1.4rem;
	/*list-style:disc circle;*/
	font-size: 0.8rem;
}
.line-message:before{
	content: '•';
	color: #373737;
	width: 5%;
	display: block;
	text-align: left;
}
.line-message span{
	color: #373737;
	display: block;
	width: 100%;
	text-align:left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.line-message .when-prop{
	color: #a6a6a6;
	text-align: left;
	width: 25%;
}
.notice-show{
	/*height: 4rem;*/
	
	
	background-color: white;
	font-size: 0.8rem;
}
.mu-item-content{
	display: flex !important;
	align-items: center !important;
	background-color: red;
	-webkit-flex-direction: row !important;
}
.module-container{
	display: flex;
	/*justify-content: center;*/
	 /*align-items: center;*/
	 flex-wrap: wrap;
	 background: white;
	 width: 100%;
}
.module-container .item-gird{
	height: 5.8rem;
	width: 25%;
	background: white;
	/*display: flex;
	justify-content: center;
	align-items: center;
	flex-direction:column;*/
	/*border: 0.5px solid #f2f2f2;*/
	position: relative;
	min-width: 20px !important;
}
.module-container .item-gird span{
	margin-top: 0.5rem;
	padding: 0;
	color:#818181;
	line-height: 1rem !important;
}
/*.module-container section ::after{
	content: '';
	position: absolute;
	bottom: 0;
	z-index:0;
	left:0;
	width: 100%;
	border-bottom: 1px solid red;
}

.module-container section ::before{
	content: '';
	position: absolute;
	top: 0;
	z-index:0;
	right:0;
	height: 100%;
	border-left: 1px solid red;
}
*/
.module-container .item-gird::before{
	content: '';
	position: absolute;
	top: 0;
	z-index:0;
	right:0;
	height: 100%;
	border-left: 1px solid #e4e4e4;
	/*border-left: 1px solid red;*/
}
.module-container .item-gird:nth-child(4n-4)::before{
	border-left:none;
}
.module-container .item-gird::after{
	content: '';
	position: absolute;
	bottom: 0;
	z-index:0;
	left:0;
	width: 100%;
	border-bottom: 1px solid #e4e4e4;
}
.btn-sec{
	width: 100%; 
	display: flex; 
	flex-direction: column; 
	justify-content: center;
	align-items: center;
	height: 100%;
}
#index-img{
	display: block;
}
#card-img{
	margin-top: 2rem;
}
#icon-container{
	position: absolute; 
	/*background-color:#51a2e7;*/ 
	color: white;
	z-index: 106; 
	width: 100%; 
	top: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	/*background-color: rgba(32,32,32,0.2);*/
}
#icon-container section,#icon-container span{
	margin: 0.5rem 0;
}
.headicon-sec {
	width: 3rem; 
	height: 3rem; 
	background-color: white; 
	border-radius: 50%; 
	overflow: hidden; 
	border:2px solid white;
	position: absolute; 
	right: 1rem; 
	top: 0.4rem;
}
.my-info{
	width:50%;
	height: 3.6rem;
	/*background-color: cornflowerblue;*/
	/*position: absolute;*/
	/*right: 1.2rem;*/
	/*bottom:0.2rem;*/
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	flex: 1;
	position: relative;
}
.class-list{
	margin: 0.8rem; 
	height:12rem; 
	/*background: cadetblue;*/
	display: flex;
	flex-direction: row;
}
.left-nav{
	width: 25%; 
	height: 100%; 
	background: white; 
	margin-right: 0.8rem;
	flex-direction: column;
	/*justify-content: center;*/
	align-items: center;
	display: flex;
	box-shadow: 0 2px 5px 3px rgba(221,221,221,0.5);
}
.right-content{
	width: 75%;
	height: 100%;
}
.left-nav span:nth-child(1),.left-nav span:nth-child(2),.left-nav span:nth-child(3){
	display: block;
	width:80% ;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.left-nav span:nth-child(1),.left-nav span:nth-child(3){
	height:4rem;
	line-height: 4rem;
}

.left-nav span:nth-child(2){
	/*border-top:1px solid gainsboro;*/
	/*border-bottom:1px solid gainsboro;*/
	width:80% ;
	height:4rem;
}

.left-nav span:nth-child(1) a,.left-nav span:nth-child(2) a,.left-nav span:nth-child(3) a{
	display: block;
	line-height: 1.4rem;
	color:#212121 ;
	font-size: 0.8rem;
}
.left-nav span:nth-child(1) a,.left-nav span:nth-child(3) a{
	
}
.my-info:nth-child(2)::after{
	content: '';
	position: absolute;
	top: 0;
	z-index:150;
	left:0;
	height: 100%;
	/*border-right: 1px solid #e4e4e4;*/
}
.class-item{
	height: 100%; 
	width: 50%; 
	background: seashell; 
	margin-right: 0.2rem;
}
.add-style{
	border-radius: 3px;
	background-color:#fff !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	/*flex: 1;*/
	box-sizing: border-box;
	position: relative;
}
/*.add-style:nth-child(2n){
	border-left: 0.3rem solid #f2f2f2;
}
.add-style:nth-child(2n-1){
	
	border-right: 0.3rem solid #f2f2f2;
}*/
.slide-sec span{
	display: block;
	color:#1f1f1f ;
	/*color:#818181;*/
	font-size: 0.9rem ;
	/*width: 100%;*/
	text-align: left;
	height: 3rem;
	flex: 5;
	line-height: 3rem;
	text-indent: 9px;
	position: relative;
}
.slide-sec{
	width: 100%; 
	height: 3rem; 
	display: flex; 
	flex-direction: row; 
	text-indent: 0.2rem;
	position: relative;
	z-index: 50;
}
.clock-container{
	position: absolute !important; 
	width: 4rem !important; 
	height: 10rem !important;
	right: 0 !important; 
	display: flex; 
	justify-content: center; 
	align-items: center;
	flex-direction: column;
	z-index: 1;
}
.new-icon{

	height: 3rem;
	line-height: 3rem;
	/*width:2.6rem;*/ 
	flex: 0.6;
	text-align: center;
}
.shade-bot{
	/*background-color:rgba(244,244,244,0.2);*/ 
	/*position: absolute;*/ 
	/*bottom: 0;*/
	/*position: relative;*/
	z-index: 108; 
	height: 3rem; 
	width: 100%; 
	/*margin:0.5rem auto 0 auto;*/
	flex-direction: row;
	background-color: #2799f3;
	/*border-radius:3px;*/
/*	box-shadow: 0 2px 5px rgba(159,159,159,0.3);*/
}
.flex-center-mid{
	display: flex;
	justify-content: center;
	align-items: center;
}
.flat-act{
	width:100%;
	height: 3.2rem;
}

.swiper-box {
    width: 100%;
    height: 100%;
    /*margin: 0 auto;*/
   margin: 0;
  }
  .swiper-item {
    height: 100%;
    text-align: center;
    /*font-size: 18px ;*/
    background: #fff;
    /* Center slide text vertically */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
  }
.click-ellipsis{
	color:#b7b7b7;
	background-color: rgba(5,25,89,0);
	display: block;
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
}
</style>
